package com.geilizu.dom.dao;

import com.geilizu.dom.dto.AbsentDto;
import com.geilizu.dom.dto.BuildingDto;
import com.geilizu.dom.dto.SearchDoAdminDto;
import com.geilizu.dom.entity.Building;
import com.geilizu.dom.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * (Building)表数据库访问层
 *
 * @author makejava
 * @since 2022-07-12 16:59:02
 */
public interface BuildingDao {
    /**
     * 获取楼宇信息
     *
     * @return
     */
    List<Building> list();

    List<AbsentDto> queryByName(@Param("value") String value, @Param("page") Integer page, @Param("size") Integer size);

    Long queryByNameCount(@Param("value") String value);

    boolean save(Building building);

    List<BuildingDto> queryAll(@Param("page") Integer page, @Param("size") Integer size);

    Long queryAllCount();

    List<Student> search(SearchDoAdminDto searchDoAdminDto);

    Long searchCount(SearchDoAdminDto searchDoAdminDto);

    Integer deleteById(Integer id);

    Integer updateById(Building building);

    BuildingDto findById(@Param("id") Integer id);
}

